The present invention relates to a numerical controller and, more particularly, to a numerical controller capable of controlling a numerically controlled machine tool (hereinafter referred to as "NC machine tool") for automatic axial feed in an axial direction of a spindle synchronous with a rotation of the spindle.
Referring to FIGS. 10A and 10B showing a NC machine tool capable of axially feeding a tool in synchronism with the rotation of a spindle for tapping in a side view and a front view, respectively, a spindle motor 12 drives a spindle to rotate a tool 13. A Z-axis motor 11 feeds the tool 13 axially, i.e., along a Z-axis, to tap a workpiece 14. A table 15 is moved horizontally by an X-axis motor 16 and a Y-axis motor 17. The machining operation of the NC machine tool is controlled by a numerical controller.
When carrying out an automatic machining operation, in which the tool 13 is fed axially in synchronism with the rotation of the spindle, a rotating speed N for the spindle, a specified (instructed) axial feed speed F.sub.c, an axial feed distance L and an accelerating/decelerating time t.sub.a are specified, and an axial feed speed pattern is determined on the basis of the axial feed distance L.
FIG. 11 is an axial feed speed pattern including sections for constant acceleration and constant deceleration.
The spindle motor 12 drives the spindle for rotation, and the Z-axis motor 11 feeds the rotating tool 13 along the Z-axis. FIG. 11 shows the variation of axial feed speed F with time t. A curve 3 in FIG. 11 indicates a normal axial feed speed pattern by way of example. The curve 3 shows axial feed of the tool 13 for a sufficiently long time at a fixed axial feed speed, i.e., the specified axial feed speed F.sub.c.
A conventional NC machine tool, in some cases, is unable to achieve normal axial feed of the tool under some conditions on a specified axial feed speed pattern. In a condition indicated by a curve 1 in FIG. 11 for instance, an axial feed distance L is excessively short for a specified axial feed speed F.sub.c and a specified acceleration a, and the tool is decelerated before the tool is accelerated to the specified axial feed speed F.sub.c. In a condition indicated by a curve 2 in FIG. 11, the tool is accelerated to the specified axial feed speed F.sub.c and is moved at the specified axial feed speed F.sub.c only a short time.
In the conditions indicated by the curves 1 and 2, acceleration greatly varies and errors in the synchronization of the axial feed speed and the rotating speed of the spindle increases. Consequently, the accuracy and quality of tapping are deteriorated. In some cases, the accuracy and quality of tapping are deteriorated by a specified speed and a specified axial feed distance